from flask import Flask
import os


app = Flask(__name__)            # create the application instance :)
app.config.from_object(__name__) # load config from this file , flaskr.py

execfile(app.root_path + '/constants.py')

# Load default config and override config from an environment variable
app.config.update(dict(DATABASE   = os.path.join(app.root_path , DB_FILE) ,
                       SECRET_KEY = APP_SECRET                            ,
                       USERNAME   = ADMIN_LOGIN                           ,
                       PASSWORD   = ADMIN_PASS                            ))
app.config.from_envvar(SETTINGS_ENV_VAR , silent = True)
